import { View } from "../../../mvc/core/View";
import { ObjCreate } from "../common/ObjCreate";
import { ImagesConst } from "../../resource/ImagesConst";
import { Language } from "../../../../extend/language/Language";
import { GlobalStyle } from "../../../common/global/GlobalStyle";
import { TreasureOverViewNewSp } from "../treasure/TreasureOverViewNewSp";
import { SPublicNotice } from "../../../../Message/Public/SPublicNotice";
//class CrossAdoreBroadcastPanel
    
    export  class CrossAdoreBroadcastPanel extends View
    {
        constructor()
        {
            super();
            this.init();
            return;
        }

        /* internal  */init(): void
        {
            ObjCreate.createBg(0, 0, 221, 410, this);
            ObjCreate.createBg(0, 0, 221, 25, this, ImagesConst.TileBg);
            ObjCreate.createGTextField(Language.getString(36351), 5, 4, 210, 20, this, GlobalStyle.textFormat6);
            this._severSp = new TreasureOverViewNewSp(220, 380);
            this._severSp.y = 26;
            addChild(this._severSp);
            return;
        }

        public /* override */ update(arg1: Object, ... rest): void
        {
            var loc3=null;
            var loc1=arg1 as Array<any>;
            var loc2=[];
            var loc4=0;
            while (loc4 < loc1.length) 
            {
                if ((loc3 = loc1[loc4] as SPublicNotice) && !(loc3.msgKey == "")) 
                {
                    loc2.push(loc3);
                }
                ++loc4;
            }
            this._severSp.update(loc2);
            this._severSp.maxScrollPosition();
            return;
        }

        /* internal  */onTimerCompleteHandler(arg1: Object /* flash.events.TimerEvent */): void
        {
            return;
        }

        /* internal */ /* var */_severSp: TreasureOverViewNewSp;
    }
